package ThreadDome;
class MyThread extends Thread {
    public void run() {
        int i = 10;
        while(i > 0) {
            System.out.println(Thread.currentThread().getName()+"线程执行中");
            i--;
            try{
                Thread.sleep(1000);
            }catch(InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
public class Dome1 {
    public static void main(String[] args) {
        MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();
        MyThread t3 = new MyThread();
        t1.start();
        t2.start();
        t3.start();
    }
}
